07. Lab: Keras
Keras
Keras is a high level deep learning API that allows us to focus on network architecture rather than on smaller details building up to the network. Keras has recently been included in the TensorFlow library which allows us to make this change with relative ease.
Q&A
Why Keras, after learning all about TensorFlow?
Keras allows you to spend more time interfacing with the data and particular actions you want to employ in your network without having to focus on a lot of little lower level thinking. It is, however, recommended that you understand the basics of neural networks first (which is what we covered in lessons before this) because this makes your use of Keras much more efficient.
What are some of the changes we will notice using Keras?
- The training routine is simplified, and supplied by a standard interface as seen here.
- You don't have to manage the tensorflow session yourself.
- The data generators have a standard interface, that are well documented here.
- The layers are classes, that have the syntax
layer()(prev_layer)
, instead of a functional interface where it islayer(prev_layer)
, the naming convention for layers is pretty standard between them. - Keras has additional layers for things like upsampling and other small features, whereas in tensorflow these are scattered about.
- If you want to add new functionality to a network then the functionality needs to be wrapped in a custom layer or written as a lambda layer.
What's better to use for real-world applications Keras or TensorFlow?
To answer that question, here are Andrew Gray's thoughts on the matter and how he and his team use both at Otto!
High Level Frameworks